#include<stdio.h>
#include<conio.h>
#include<math.h>
int main(){
    float x,x1,x2,a,b,c,delta;
    printf("\nnhap vao a,b,c: ");
    scanf("\t%f%f%f",&a,&b,&c);
    if(a==0){
             if(b!=0) printf("\nphuong trinh co 1 nghiem: %f",x=-b/c);
             }
    else if(a!=0){
            delta=(b*b)-(4*a*c);
            printf("\n\tdelta= %0.2f",delta);
            if(delta<0) printf("\nphuong trinh vo nghiem");
            if(delta==0) printf("\nphuong trinh co 1 nghiem kep: %0.2f",x=-b/2*a);
            if(delta>0) {
            x1=(-b+sqrt(delta))/(2*a);
            x2=(-b-sqrt(delta))/(2*a);
            printf("\nphuong trinh co 2 nghiem: \n\tx1= %0.2f\n\tx2= %0.2f",x1,x2);
            }
         }
    
    getch();
}
